<!DOCTYPE html>
<html>
<head>
	<title>详细设定</title>
	<meta charset="utf-8">
	<link rel="shortcut icon" href="favicon.ico">
	<link href="__STATIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/css/font-awesome.css" rel="stylesheet">
    <link href="__STATIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__STATIC__/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/css/style.css?v=4.1.0" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="__STATIC__/xinli/css/history.css">
	<style type="text/css">
		.memu>span>a{
			color: yellow;
		}
	.middle-line1-content{
				width: 99%;
		background-color: rgba(182, 171, 171, 0.56);
		font-size: 12px;
		border: 1px solid rgba(128, 128, 128, 0.72);
		border-radius: 5px;
		margin: 0 auto;
		}
	.middle-line1-content>div{
		margin-top: 3px;
		padding: 3px 0;
		}

	.plate{
		float: left;
		width: 10%;
		color: black;
		text-align: center;
	}
	
	.hangkong{
		float: left;
		width: 30%;
	}

	.hangkong>span>a{
		padding: 0 2px;
		color: red;
	}

	.issue{
		float: left;
		width: 60%;
		color: black;
	}

	.issue>button{
		border: 1px solid gray;
			border-radius: 5px;
	}

	.open{
		width: 100%;
			padding: 5px 10px;
	}

	.open-one{
		width: 100%;
		float: left;
		height: 100%;
	}

	.open-name>th{
		background: rgb(224,139,46);
		color: white;
		padding: 2px;
		text-align: center;
		border: 2px solid silver;
	}

	.open-thing>td{
		background: rgb(240,240,240);
		color: black;
		padding: 2px;
		text-align: center;
		border: 2px solid silver;
		font-size: 12px;
	}

	.open-thing>td:last-child{
		font-size: 12px;
	}


	.open-thing>td>input{
			width: 45px;
			font-size: 12px;
			border-radius: 3px;
			border: 1px solid gray;
			text-align: center;
	}

	.redorblue{
		text-align: center;
			padding: 10px 0;
			border: 1px solid gray;
	}

	.sendout>button{
		font-size: 12px;
			border: 1px solid gray;
			border-radius: 3px;
			color: black;
	}

	.sendup{
		margin-left: 30px;
	}

	.sendup>button{
		border: 1px solid gray;
			border-radius: 3px;
			color: black;
	}

	.sendlast{
		color: black;
			text-align: center;
			padding: 10px 0;
			border: 1px solid gray;
	}

	.sendlast>button{
		border: 1px solid rgb(3, 169, 244);
			border-radius: 3px;
			font-size: 12px;
	}

	.jiance{
		border: 1px solid gray;
    		padding: 2px 5px;
    		border-radius: 3px;
    		cursor: pointer;
	}

	.queren{
		text-align: center;
    		color: black;
    		font-size: 16px;
    		margin-top: 15px;
    		height: 50px;
	}

	.queren>span{
		 background: rgb(240,240,240);
    		border: 1px solid rgb(2, 166, 242);
    		padding: 5px 10px;
    		border-radius: 3px;
    		margin-left: 10px;
	}
	</style>
</head>
<body>
	<div>
		<div class="heads">
			<div class="poly">保利</div>
			<div style="clear: both;"></div>

		<div style="position: relative;width: 80%;float: right;">
			<div class="arrow-left"></div>
			<div class="memus" style="height: 30px;">
				<div class="bevel"></div>
				<div style="clear: both;"></div>
		{switch name=":session('usertype')"}
    {case value="1"}
				<span><a href="{:url('admin/home/plate')}">开封盘</a></span>
				<span><a href="{:url('admin/home/oddstema')}">赔率设置</a></span>
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/director')}">总监</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<!-- <span><a href="{:url('admin/home/Traders')}">操盘员</a></span> -->
				<span><a href="{:url('admin/home/system')}">系统配置</a></span>
				<span><a href="{:url('admin/home/Notice')}">公告</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/fot')}">客服</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="2"}
    		{switch name=":session('roots')"}
    		 {case value="0"}
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
				 {/case}
				{case value="1"}
				<span><a href="{:url('admin/home/plate')}">开封盘</a></span>
				<span><a href="{:url('admin/home/oddstema')}">赔率设置</a></span>
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<!-- <span><a href="{:url('admin/home/Traders')}">操盘员</a></span> -->s
				<span><a href="{:url('admin/home/system')}">系统配置</a></span>
				<span><a href="{:url('admin/home/Notice')}">公告</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/fot')}">客服</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
				 {/case}
			{default /}
    			<span><a href="{:url('admin/login/logout')}">登出</a></span>
			{/switch}
    {/case}
    {case value="3"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="4"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="5"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="6"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {default /}
    			<span><a href="{:url('admin/login/logout')}">登出</a></span>
	{/switch}
			</div>
			<div style="clear: both;"></div>
		

		<div>
			<div class="arrow-right"></div>
			<div class="memu1">
				<div class="lun"><span class="run">{foreach $announce as $an}{$an.content}{/foreach}</span>
				</div>
			</div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>
		</div>

		<div class="middle">
			<div class="setone">
		<div class="headone">
			<span>会员&emsp;{$name}&emsp;详细设定</span>
			<a href="#"><span style="color: black;" id="backone">返回上一页</span></a>
		</div>

		<div class="headtwo">
			<table style="display: block; width: 50%;margin: 0 auto;">
				<thead>
					<tr>
						<th>类型</th>
						<th>A盘</th>
						<th>B盘</th>
						<th>C盘</th>
						<th>D盘</th>
						<th>单项(号)限额</th>
						<th>单注限额</th>
						<th>降赔率</th>
					</tr>
				</thead>
				<tbody>
				{foreach $res as $r}
					<tr>
						<td>
							<b>{$r.name}</b>
						</td>
						<td>
							<select>
							{for  start="0" end="16" step="0.05"}
								<option value="{$r.ts}">{$r.ts}</option>
								{/for}
							</select>	
						</td>
						<td>
							<select>
							{for  start="0" end="16" step="0.05"}
								<option value="{$r.ts2}">{$r.ts2}</option>
								{/for}
							</select>
						</td>
						<td>
							<select>
							{for  start="0" end="16" step="0.05"}
								<option value="{$r.ts3}">{$r.ts3}</option>
								{/for}
							</select>
						</td>
						<td>
							<select>
							{for  start="0" end="16" step="0.05"}
								<option value="{$r.ts4}">{$r.ts4}</option>
								{/for}
							</select>
						</td>
						<td>
							{$r.limitnum}
						</td>
						<td>
							{$r.limits}
						</td>
						<td>
							{$r.reduce}
						</td>
					</tr>
					{/foreach}
					<!-- <tr><td><b>特码A</b></td></tr>
					<tr><td><b>特码单双</b></td></tr>
					<tr><td><b>特码大小</b></td></tr>
					<tr><td><b>特码合码单双</b></td></tr>
					<tr><td><b>正码</b></td></tr>
					<tr><td><b>总和单双</b></td></tr>
					<tr><td><b>总和大小</b></td></tr>
					<tr><td><b>特码色波</b></td></tr>
					<tr><td><b>特码生肖</b></td></tr>
					<tr><td><b>正码1-6单双</b></td></tr>					
					<tr><td><b>正码1-6大小</b></td></tr>
					<tr><td><b>正码1-6色波</b></td></tr>
					<tr><td><b>正码1-6合单双</b></td></tr>
					<tr><td><b>半波</b></td></tr>
					<tr><td><b>多肖</b></td></tr>
					<tr><td><b>一肖[中]</b></td></tr>
					<tr><td><b>尾数</b></td></tr>
					<tr><td><b>三全中</b></td></tr>
					<tr><td><b>三中二</b></td></tr>
					<tr><td><b>二全中</b></td></tr>
					<tr><td><b>二中特</b></td></tr>
					<tr><td><b>特串</b></td></tr>
					<tr><td><b>七色波</b></td></tr>
					<tr><td><b>正码特</b></td></tr>
					<tr><td><b>特码合数大小</b></td></tr>
					<tr><td><b>特码尾数大小</b></td></tr>
					<tr><td><b>特码半特</b></td></tr>
					<tr><td><b>特码头数</b></td></tr>
					<tr><td><b>特码尾数</b></td></tr>
					<tr><td><b>总肖</b></td></tr>
					<tr><td><b>总肖单双</b></td></tr>
					<tr><td><b>正肖</b></td></tr>
					<tr><td><b>连肖</b></td></tr>
					<tr><td><b>正码过关</b></td></tr>
					<tr><td><b>5不中</b></td></tr>
					<tr><td><b>6不中</b></td></tr>
					<tr><td><b>7不中</b></td></tr>
					<tr><td><b>8不中</b></td></tr>
					<tr><td><b>9不中</b></td></tr>
					<tr><td><b>10不中</b></td></tr>
					<tr><td><b>11不中</b></td></tr>
					<tr><td><b>12不中</b></td></tr>
					<tr><td><b>3中一</b></td></tr>
					<tr><td><b>4中一</b></td></tr>
					<tr><td><b>5中一</b></td></tr>
					<tr><td><b>6中一</b></td></tr>
					<tr><td><b>一肖不中</b></td></tr>
					<tr><td><b>尾数连</b></td></tr>
					<tr><td><b>七码</b></td></tr> -->
				</tbody>
				</table>

				

				<div class="queren">
					<span id="modify">确认修改</span>
					<span id="cancel">取消</span>
				</div>
						
						
		</div>
	</div>
		</div>
	</div>
	<!-- 全局js -->
    <script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>
    	<!-- 自定义JS -->
	<script src="__STATIC__/js/admin/controtiren.js"></script>
  <script type="text/javascript">
  	$("#backone").click(function(){
  		history.back(-1);
  	})


  	 $(function(){
           		 $("#jinyong").each(function () {
                	$(this).attr("disabled","disabled");
           	 });
        	});

  		function change(){
     			document.getElementById("chax")[fen].selected=true;
		}

  		 $("#chax").change(function(){
  			 	// console.log($(this).val());
			    	var cha = $(this).val();
			    	$("#chaxun").click(function(){
			    		// console.log(cha)
			    		if (cha == "zong" ){
			    			window.location.href="{:url('admin/home/redcheck')}";
			    			 document.cha.action="{:url('admin/home/redcheck')}";
			    			document.cha.submit();
			    		}else if(cha == "fen"){
			    			window.location.href="{:url('admin/home/redPoints')}";
			    			document.cha.action="{:url('admin/home/redPoints')}";
			    			document.cha.submit();
			    		}
				});
			    	})

  		$(function(){ 
				var timestamp = Date.parse(new Date());
				$("input[name=stime]").attr('value',fmtDate(timestamp));
				$("input[name=etime]").attr('value',fmtDate(timestamp)); 
				   
			})
  		function fmtDate(obj){
			    var date =  new Date(obj);
			    var y = 1900+date.getYear();
			    var m = "0"+(date.getMonth()+1);
			    var d = "0"+date.getDate();
			    return y+"-"+m.substring(m.length-2,m.length)+"-"+d.substring(d.length-2,d.length);
			}
			$('.buttons').find('span').click(function(){
				var n = $(this).attr('data-type');
				// console.log(n)
				if(n==1){
					// 本本周
					var now = new Date(); 
					var nowTime = now.getTime() ; 
					var day = now.getDay();
					var oneDayLong = 24*60*60*1000 ; 

					var MondayTime = nowTime - (day-1)*oneDayLong  ; 
					var SundayTime =  nowTime + (7-day)*oneDayLong ; 
					$("input[name=stime]").val(fmtDate(MondayTime));
					$("input[name=etime]").val(fmtDate(SundayTime));
					// console.log(fmtDate(MondayTime),fmtDate(SundayTime)); 
				}
				if(n==2){
					// 上周
					var now = new Date;
			        var day = now.getDay ();
			        var week = "7123456";
			        var first = 0 - week.indexOf (day);
			        var f = new Date;
			        f.setDate (f.getDate () + first-6);
			        var last = 6 - week.indexOf (day);
			        var l = new Date;
			        l.setDate (l.getDate () + last-6);
			        $("input[name=stime]").val(fmtDate(f));
					$("input[name=etime]").val(fmtDate(l));
				}
				if(n==3){
					var firstDate = new Date();
					firstDate.setDate(1); //第一天
					var endDate = new Date(firstDate);
					endDate.setMonth(firstDate.getMonth()+1);
					endDate.setDate(0);
					$("input[name=stime]").val(fmtDate(firstDate));
					$("input[name=etime]").val(fmtDate(endDate));
				// console.log(fmtDate(firstDate),fmtDate(endDate))
				}
				if(n==4){
					var nowdays = new Date();  
					var year = nowdays.getFullYear();  
					var month = nowdays.getMonth();  
					if(month==0)  
					{  
					    month=12;  
					    year=year-1;  
					}  
					if (month < 10) {  
					    month = "0" + month;  
					}  
					var firstDay = year + "-" + month + "-" + "01";//上个月的第一天  
					var myDate = new Date(year, month, 0);  
					var lastDay = year + "-" + month + "-" + myDate.getDate();//上个月的最后一天  
					// console.log(firstDay,lastDay);
					$("input[name=stime]").val(firstDay);
					$("input[name=etime]").val(lastDay);
				}

			})
			function fmtDate(obj){
			    var date =  new Date(obj);
			    var y = 1900+date.getYear();
			    var m = "0"+(date.getMonth()+1);
			    var d = "0"+date.getDate();
			    return y+"-"+m.substring(m.length-2,m.length)+"-"+d.substring(d.length-2,d.length);
			}



			//公告轮播
    		$(function(){
			var price = 0
			//轮播
			var left = 0;
			function move(){
				left--
				if (left < -$(".run").width()) {
					left = 0
				}
				$(".run").css("left",left+"px")
			}
			setInterval(move,60)
		})


    	function getQueryString(id) { 
    		var reg = new RegExp("(^|&)" + id + "=([^&]*)(&|$)", "i"); 
    		var r = window.location.search.substr(1).match(reg); 
    		if (r != null) return unescape(r[2]); return null; 
    		} 
    	$("#modify").click(function(){
    		var values = '';
    		var valuesone = '';
    		var valuestwo = '';
    		var valuesthree = '';
 	 	$('#tableone select').each(function(){
 	 		if (values =='') {
 	 			values = $(this).val();
 	 		}else{
 	 			values= values+';'+$(this).val();
 	 		}
 	 	})
 	 	$('#tabletwo select').each(function(){
 	 		if (valuesone =='') {
 	 			valuesone = $(this).val();
 	 		}else{
 	 			valuesone= valuesone+';'+$(this).val();
 	 		}
 	 	})
 	 	$('#tablesthree select').each(function(){
 	 		if (valuestwo =='') {
 	 			valuestwo = $(this).val();
 	 		}else{
 	 			valuestwo= valuestwo+';'+$(this).val();
 	 		}
 	 	})
 	 	$('#tablefour select').each(function(){
 	 		if (valuesthree =='') {
 	 			valuesthree = $(this).val();
 	 		}else{
 	 			valuesthree= valuesthree+';'+$(this).val();
 	 		}
 	 	})
 	 	var putid=getQueryString('id');
 	 	// console.log(values);

 	 	$.post('{:url("admin/Interfaces/detailedupdata")}', {
				id:putid,
				a:values,
				b:valuesone,
				c:valuestwo,
				d:valuesthree,
			}, function (res) {
				console.log(res);
				if (res == 1) {
					alert("修改成功");
					document.location.reload();
				} else {
					alert('修改失败');
					return;
				}
			})
 	 })
    	
 	 
 	
    		
                 
			
  </script>


</body>
</html>